libxl: correct error path in libxl_userdata_retrieve
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 28 Jan 2011 16:43:53 +0000 (16:43 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 28 Jan 2011 16:43:53 +0000 (16:43 +0000)
commita76377f10e9df051a820c55ab83ed9fffa7e9a53
treed6db568ae273229f41b67636ed7967212cbaaadc
parent4df98b33c284d5f0e923e67b78a66d679636ca10
libxl: correct error path in libxl_userdata_retrieve

Firstly, if libxl_read_file_contents fails, it doesn't really leave
*data and *datalen_r undefined - it leaves them unchanged.  Tighten up
the spec for the benefit of libxl_userdata_retrieve.

Secondly, libxl_userdata_retrieve ignored errors, assuming they were
all ENOENT.  Instead it should fail on unexpected errors.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Jim Fehlig <jfehlig@novell.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dom.c
tools/libxl/libxl_utils.h